package com.ithao.service.impl;

import com.ithao.dao.BookMapper;
import com.ithao.domain.Book1;
import com.ithao.service.BookService;

import java.util.List;

public class BookServiceImpl implements BookService {

    public BookMapper getBookMapper() {
        return bookMapper;
    }

    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }

    private BookMapper bookMapper;

    public int addBook(Book1 book1) {
        return bookMapper.addBook(book1);
    }

    public int deleteBookByID(int id) {
        return bookMapper.deleteBookByID(id);
    }

    public int updateBook(Book1 book1) {
        return bookMapper.updateBook(book1);
    }

    public Book1 quaryBookByID(int id) {
        return bookMapper.quaryBookByID(id);
    }

    public List<Book1> quaryAllBook() {
        return bookMapper.quaryAllBook();
    }

    public Book1 queryBookByName(String bookName) {
        return bookMapper.queryBookByName(bookName);
    }
}